package cn.ffcs.sort.model;

import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;

import cn.ffcs.base.model.BaseEntity;

/**
 * 产品目录实体类：定义基本属性<br/>
 * <table>
 * <tr>
 * <td>负责人/principal:</td>
 * <td colspan="2">g.huangjx</td>
 * <tr>
 * <td>修改记录/revision:</td>
 * <td colspan="2"></td>
 * </tr>
 * <tr>
 * <td>日期:2009-2-26</td>
 * <td>修改人:g.huanjx</td>
 * <td>修改说明:</td>
 * </tr>
 * <tr>
 * <td></td>
 * <td></td>
 * <td></td>
 * </tr>
 * </table>
 * @author g.huangjx
 * @version $Id$
 */

public class ProductSort extends BaseEntity
{
   
  //  private String name;
    /** 唯一键 **/
    protected Integer id;
    
    /** 产品分类名称**/
    private String name;
    
    /** 描述 **/
    private String description;
    
    /** 所属父分类.分类上下级关系。 **/
    private String parentSort;
    
    /** 所属父分类名字。 **/
    private String parentName;
    

    /** 分类类型。分产品目录类和产品视图类，分别以CATALOG和VIEW来表示 **/
    private String sortType;
    
    /** 产品类型字类型个数 **/
    private int childCount;

    private Set productRefSorts= new HashSet(); 
    
    // Constructors
    /** default constructor */
    public ProductSort() {
    }
    
    /** minimal constructor */

    public Integer getId()
    {
        return id;
    }

    public void setId(Integer id)
    {
        this.id = id;
    }

    /** full constructor */
    public ProductSort(String id, ProductSort ProductSort,
            String name, String description, String parentSort,String parentName,String sortType, String creator,
            Date begin, Date end, Set ProductSorts,
            Set SortRefProducts) {
        this.id = super.id;
        this.name = name;
        this.description = description;
        this.parentSort=parentSort;
        this.parentName=parentName;
        this.sortType = sortType;
        this.creator = creator;
        this.begin = begin;
        this.end = end;

    }

    // Property accessors


    public String getName() {
        return this.name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return this.description;
    }

    public void setDescription(String description) {
        this.description = description;
    }
    public String getParentSort()
    {
        return parentSort;
    }

    public void setParentSort(String parentSort)
    {
        this.parentSort = parentSort;
    }
    public String getSortType() {
        return this.sortType;
    }

    public void setSortType(String sortType) {
        this.sortType = sortType;
    }

    public int getChildCount()
    {
        return childCount;
    }

    public void setChildCount(int childCount)
    {
        this.childCount = childCount;
    }
    public String getParentName()
    {
        return parentName;
    }

    public void setParentName(String parentName)
    {
        this.parentName = parentName;
    }
    public Set getProductRefSorts()
    {
        return productRefSorts;
    }

    public void setProductRefSorts(Set productRefSorts)
    {
        this.productRefSorts = productRefSorts;
    }

}
